# -*- coding: utf-8 -*-
import ConfigParser 
import string, os, sys 
import logging

cf = ConfigParser.ConfigParser() 
cf.read('maitreya/properties.cfg')
mode = cf.get('global', 'mode')

def getProperty(key):
    ''' 获得配置信息 '''
    return cf.get(mode, key)

FORMAT = "%(asctime)-15s %(message)s"
logging.basicConfig(filename=getProperty('log'), format = FORMAT, level=logging.INFO)

